<%--
  Created by IntelliJ IDEA.
  User: 武露斌
  Date: 2021/11/1
  Time: 11:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="../../js/jquery-1.8.2.min.js"></script>
    <link rel="stylesheet" href="../../css/css.css">
</head>
<body>

<form>
    姓名：<input type="text" name="aname"> <br>
    性别：
    <select name="sex">
        <option value="">请选择性别</option>
        <option value="男">男</option>
        <option value="女">女</option>
    </select><br>
    地址：<input type="text" name="sheng"> <br>
    注册单位：<input type="text" name="zcdw"> <br>
    会计师分类：<input type="text" name="tid"> <br>
    会计师分类：<input type="text" name="tname"> <br>
    职业资格证书编号：<input type="text" name="zyid"> <br>
    注册号：<input type="text" name="zch"> <br>
    日期：<input type="text" name="yxdate"> <br>
</form>
<input type="button" value="添加" onclick="add()">

</body>
</html>
<script>

        function add() {
            var formData = new FormData($("form")[0]);
            $.ajax({
                url:"add.do",
                data:formData,
                type:"post",
                dataType:"json",
                success:function (data) {
                    if (data>0){
                        alert("添加成功")
                        location="list.do"
                    }
                },processData:false,contentType:false
            })


        }

</script>
